home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ 1⁄5⁄90 / 0337-IControl ignoring it-Jan90 < prev    next >
Encoding:
Text File  |  1990-01-05  |  1.6 KB  |  45 lines  |  [TEXT/GEOL]

  1. Item    8039134                         5-Jan-90        13:11
  2.  
  3. From:   TERRAN                          Cyberex, Terran Van Wagner,PRT
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.  
  7. Sub:    IControl ignoring itsDocument
  8.  
  9. I am having problems getting the fChangeCount to be incremented for
  10. my editText fields in a DialogView.  I want to use default command
  11. objects for undoing, redoing the typing in these edit text fields.
  12. It seems that the fChangedDocument is NIL when TApplication.PerformCommand
  13. is executed. (The fCausesChange is set to TRUE.)  I also see that
  14. the fDocument field is NIL for the TTEView that gets passed to the
  15. ICommand method.  This stems from the fact that TDialogView.MakeTEView
  16. sends NIL as the document parameter when calling ITEView.  Why is the
  17. document for the TTEView NIL?  The only thing I can see to do is to
  18. override the MakeTEView method and set the document myself.  Am I
  19. missing something, or is this the way to do it?
  20.  
  21. Looking through TControl.IControl, I see that it always passes NIL
  22. for the document to it's IView call,  breaking the connection
  23. to the document for all it's subclasses .(LOTS of CLASSES)
  24.  
  25. Perhaps related, quoting from MacApp Source:
  26.  
  27. TControl.IRes(itsDocument: TDocument; itsSuperView: TView; VAR itsParams: Ptr);
  28.  
  29. VAR
  30.   aTextStyle:  TextStyle;
  31.  
  32. BEGIN
  33. { Don't pass the document to INHERITED IRes.  This avoids
  34. putting the control on the document's view list.}
  35. INHERITED IRes(NIL, itsSuperView, itsParams);
  36. fDocument := itsDocument;
  37. ...
  38. END;
  39.  
  40. In our application we often need access to the document from a control
  41. are we doing something strange?
  42.  
  43. Thanks, Terran
  44.  
  45.